<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<jsp:useBean id="pageBean" scope="request" class="com.agileai.hotweb.domain.PageBean"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>测试方案</title>
<%@include file="/jsp/inc/resource.inc.jsp"%>
<script language="javascript">

</script>
</head>
<body>
<form action="<%=pageBean.getHandlerURL()%>" name="form1" id="form1" method="post">
<%@include file="/jsp/inc/message.inc.jsp"%>
<div id="__ParamBar__" style="float: right;">&nbsp;</div>
<div id="__ToolBar__">
<table border="0" cellpadding="0" cellspacing="1">
<tr>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onclick="enableSave()" ><input value="&nbsp;" type="button" class="editImgBtn" id="modifyImgBtn" title="编辑" />编辑</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onclick="doSubmit({actionType:'save'})"><input value="&nbsp;" type="button" class="saveImgBtn" id="saveImgBtn" title="保存" />保存</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onclick="goToBack();"><input value="&nbsp;" type="button" class="backImgBtn" id="backImgBtn" title="返回" />返回</td>
</tr>
</table>
</div>
<table class="detailTable" cellspacing="0" cellpadding="0">
<tr>
	<th width="100" nowrap>名称</th>
	<td><input id="PT_NAME" label="名称" name="PT_NAME" type="text" value="<%=pageBean.inputValue("PT_NAME")%>" size="24" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>状态</th>
	<td><select id="PT_STATE" hidden label="状态" name="PT_STATE" class="select"><%=pageBean.selectValue("PT_STATE")%></select>
</td>
</tr>
<tr>
	<th width="100" nowrap>创建人员</th>
	<td><input id="PT_CREATE_NAME" label="创建人员" name="PT_CREATE_NAME" type="text" value="<%=pageBean.inputValue("PT_CREATE_NAME")%>" readonly="readonly" size="24" class="text" />
	<input id="PT_CREATE" label="创建人员" name="PT_CREATE" type="hidden" value="<%=pageBean.inputValue("PT_CREATE")%>" />
</td>
</tr>
<tr>
	<th width="100" nowrap>创建时间</th>
	<td><input id="PT_TIME" label="创建时间" name="PT_TIME" type="text" value="<%=pageBean.inputTime("PT_TIME")%>" readonly="readonly" size="24" class="text" />
</td>
</tr>
<%
	if("insert".equals(pageBean.getOperaType())){%>
		<input id="PT_PUBLISHER" label="发布人员" name="PT_PUBLISHER" type="hidden" value="<%=pageBean.inputValue("PT_PUBLISHER")%>" />
		<input id="PT_PUBL_TIME" label="发布时间" name="PT_PUBL_TIME" type="hidden" value="<%=pageBean.inputTime("PT_PUBL_TIME")%>" />
	<%}else{%>
<tr>
	<th width="100" nowrap>发布人员</th>
	<td><input id="PT_PUBLISHER_NAME" label="发布人员" name="PT_PUBLISHER_NAME" type="text" value="<%=pageBean.inputValue("PT_PUBLISHER_NAME")%>" readonly="readonly" size="24" class="text" />
	<input id="PT_PUBLISHER" label="发布人员" name="PT_PUBLISHER" type="hidden" value="<%=pageBean.inputValue("PT_PUBLISHER")%>" />
</td>
</tr>
<tr>
	<th width="100" nowrap>发布时间</th>
	<td><input id="PT_PUBL_TIME" label="发布时间" name="PT_PUBL_TIME" type="text" value="<%=pageBean.inputTime("PT_PUBL_TIME")%>" readonly="readonly" size="24" class="text" />
</td>
</tr>
<%} %>
</table>
<input type="hidden" name="actionType" id="actionType" value=""/>
<input type="hidden" name="operaType" id="operaType" value="<%=pageBean.getOperaType()%>"/>
<input type="hidden" id="PT_ID" name="PT_ID" value="<%=pageBean.inputValue4DetailOrUpdate("PT_ID","")%>" />
<input type="hidden" id="PI_ID" name="PI_ID" value="<%=pageBean.inputValue("PI_ID")%>" />
</form>
<script language="javascript">
datetimeValidators[0].set("yyyy-MM-dd HH:mm").add("PT_TIME");
datetimeValidators[1].set("yyyy-MM-dd HH:mm").add("PT_PUBL_TIME");
initDetailOpertionImage();
requiredValidator.add("PT_NAME");
$(function(){
	$("<input readonly='readonly'  type='text' value='"+$('#PT_STATE option:selected').text()+"'  size='24' class='text' />").insertAfter("#PT_STATE");  
	
		disableButton("modifyImgBtn");
		disableButton("saveImgBtn");
		disableButton("backImgBtn");
		var ptState='<%=pageBean.selectedValue("PT_STATE")%>';
		if(ptState=='INITIALIZE'){
			enableButton("modifyImgBtn");
			enableButton("saveImgBtn");
			enableButton("backImgBtn");
		}
		if(ptState=='SUBMIT'){
			disableButton("modifyImgBtn");
			disableButton("saveImgBtn");
			enableButton("backImgBtn");
		} 
		if(ptState=='FILE'){
			disableButton("modifyImgBtn");
			disableButton("saveImgBtn");
			enableButton("backImgBtn");
		}
	
})
</script>
</body>
</html>
<%@include file="/jsp/inc/scripts.inc.jsp"%>
